using System;
using System.IO;
namespace ICSharpCode.SharpZipLib.Zip
{
	public static class ZipTesting
	{
		public static bool TestArchive(byte[] data)
		{
			return ZipTesting.TestArchive(data, null);
		}
		public static bool TestArchive(byte[] data, string password)
		{
			bool result;
			using (MemoryStream memoryStream = new MemoryStream(data))
			{
				using (ZipFile zipFile = new ZipFile(memoryStream))
				{
					zipFile.Password = password;
					result = zipFile.TestArchive(true);
				}
			}
			return result;
		}
	}
}
